package com.qsxc.constants;

import java.util.concurrent.TimeUnit;

/**
 * Redis
 *
 * @author 
 */
public class RedisConstant {

    public interface CacheNames {
        String SECONDS10 = "seconds10";
        String DAY1 = "day1";
        String SECOND30 = "seconds30";
        String MINUTE1 = "minute1";
        String MINUTE2 = "minute2";
        String MINUTE3 = "minute3";
        String MINUTE10 = "minute10";
        String MINUTE30 = "minute30";
        String DEFAULT = "default";
        String FUCTION = "userfuction";
        String USERS = "users";
        String SYSTEMCONFIG = "systemConfig";
    }

    public interface KeyGenerators {
        String simpleKeyGenerator = "simpleKeyGenerator";
    }

    /**
     * 缓存失效时间 单位s
     */
    public interface CacheExpireTime {
        long DEFAULT_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(1);
        long SECONDS10_EXPIRE_TIME = TimeUnit.SECONDS.toSeconds(10);
        long SECONDS30_EXPIRE_TIME = TimeUnit.SECONDS.toSeconds(30);
        long MINUTE1_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(1);
        long MINUTE2_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(2);
        long MINUTE3_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(3);
        long MINUTE5_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(5);
        long MINUTE10_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(10);
        long MINUTE30_EXPIRE_TIME = TimeUnit.MINUTES.toSeconds(30);
        long HOUR2_EXPIRE_TIME = TimeUnit.HOURS.toSeconds(2);
        long HOUR20_EXPIRE_TIME = TimeUnit.HOURS.toSeconds(20);
        long DAY1_EXPIRE_TIME = TimeUnit.DAYS.toSeconds(1);
        long DAY7_EXPIRE_TIME = TimeUnit.DAYS.toSeconds(7);
        long NO_EXPIRE = TimeUnit.DAYS.toSeconds(365);
    }
}